package com.dayouzi.crawler_monitor.service;

import com.dayouzi.crawler_monitor.pojo.page.PageBean;
import com.dayouzi.crawler_monitor.pojo.query.*;
import com.dayouzi.crawler_monitor.pojo.vo.CrawlerDataListVO;
import com.dayouzi.crawler_monitor.pojo.vo.CrawlerDataQueryVO;
import com.dayouzi.crawler_monitor.pojo.vo.CrawlerDataVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface CrawlerDetailService {
    /**
     * 根据id获取数据信息
     * @param crawlerDataQuery
     * @return
     */
    CrawlerDataVO getCrawlerDataById(CrawlerDataQuery crawlerDataQuery);

    /**
     * 根据id修改数据信息
     * @param crawlerDataUpdateVO
     */
    void updateCommit(CrawlerDataUpdateVO crawlerDataUpdateVO);

    /**
     * 修改数据状态
     * @param status
     */
    void updateStatus(Integer did, Integer status);

    /**
     * 上传附件
     * @param files
     */
    void uploadFile(Integer id, String tableName, MultipartFile[] files);

    /**
     * 修改正文
     * @param id
     * @param tableName
     * @param info
     */
    void updateInfo(Integer id, String tableName, String info);

    /**
     * 新增数据
     * @param addDataQuery
     * @return
     */
    CrawlerDataQueryVO addData(AddDataQuery addDataQuery);

    /**
     * 查询爬虫最近爬取数据
     * @return
     */
    PageBean<CrawlerDataListVO> listPageCrawlerData(CrawlerDataListQuery crawlerDataListQuery);

    /**
     * 补充政策数据
     * @param addDataPolicyQuery
     * @return
     */
    CrawlerDataQueryVO addDataPolicy(AddDataPolicyQuery addDataPolicyQuery);
}
